Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BlockOverrides and StateOverrides fields to eth_call #4833

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

sunwavesun
Copy link

Description

This PR introduces two new optional fields, BlockOverrides and StateOverrides, to the eth_call method. These fields are designed to enhance the functionality of eth_call and are particularly used by account abstraction bundlers to simulate user operations prior to submitting them to the blockchain.

Changes

BlockOverrides

  • Modifies the context in which the transactions of a given block are executed.
  • When overriding multiple blocks:
    • Block numbers must increment.
    • Skipping block numbers is allowed, and skipped blocks are included in the response.
    • Time across multiple blocks must be increasing. If time is not explicitly specified, it increments by one for each block.

StateOverrides

  • Provides an optional address-to-state mapping.
  • Each entry specifies some state to be ephemerally overridden before executing each block.

Notes

  • No breaking changes; these fields are optional and do not interfere with existing behavior.
  • The enhancements align with ongoing improvements to support account abstraction workflows.
  • For more details, refer to the geth documentations.

@sophoah
Copy link
Contributor

sophoah commented Jan 17, 2025

Hey @sunwavesun, can you develop the unit test ?

@sophoah sophoah requested review from Frozen and sophoah January 17, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants